import os

BASE_DIRS = os.path.dirname(__file__)  # 项目根目录

# 参数
options = {
    "port": 8888
}

# 配置
settings = {
    # 网页模板
    "template_path": os.path.join(BASE_DIRS, "templates"),
    # 静态模板
    "static_path": os.path.join(BASE_DIRS, "static"),
    "debug": True
}

# mysql配置
mysql_options = dict(
    host="127.0.0.1",
    port=3306,
    database="studydb",
    user="root",
    password="123456"
)

DB_URL = f"mysql+pymysql://{mysql_options['user']}:{mysql_options['password']}@{mysql_options['host']}:{mysql_options['port']}/{mysql_options['database']}"

# 目录配置，用于加载模型
lib_path = [
    "views"
]
